Skip to main content

Create Sub-Account API Key

Type: POST

Description: /v4/user/account/api-key/broker-sub

Creates an API Key for a broker sub-account. The request must be signed with the broker master account's API Key. The WITHDRAW permission is not allowed.

Parameters

NameTypeMandatoryDefaultDescriptionRanges
subAccountIdlongtrue-Target sub-account id (must belong to this master account)-
keyNamestringtrue-Remark / label-
permissionsstring[]true-Permission codes; WITHDRAW is rejectedQUERY, TRADE, TRANSFER, FUTURE
bindIpsstring[]false-IP allowlist-

Response Parameters

caution

secretKey is returned only once, at creation time. Store it immediately — it cannot be retrieved again.

NameTypeDescription
subAccountIdlongSub-account id
accessKeystringThe new access key
secretKeystringThe secret key — returned once, store it now
permissionsstring[]Granted permissions
bindIpsstring[]Bound IPs
createTimelongCreation time (ms)

Response Example

Response
{
"rc": 0,
"mc": "SUCCESS",
"ma": [],
"result": {
"subAccountId": 10049631158745,
"accessKey": "69af55c4-e26c-4cea-a0b4-61a33c400840",
"secretKey": "7b6394de5c35bf6cb11c570b06d6db54e8050bc1",
"permissions": ["QUERY"],
"bindIps": [],
"createTime": 1784088472976
},
"success": true
}